import datetime

today=datetime.date.today()

lastday=datetime.date(today.year,today.month,1)-datetime.timedelta(days=1)
firstday=datetime.date(today.year,today.month-1,1)
print(lastday)
print(lastday-firstday+datetime.timedelta(days=1))